package com.train.daily.req.station;

import com.train.common.group.AddGroup;
import com.train.common.group.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * DailyTrainStationAddOrEditReq
 * @author baitiaojun
 * @createDate 2025-03-01 14:35:49
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DailyTrainStationAddOrEditReq {


    /**
     * id
     */
    @NotNull(message = "【id】不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 日期
     */
    @NotNull(message = "【日期】不能为空", groups = {AddGroup.class, EditGroup.class})
    private LocalDate date;

    /**
     * 车次编号
     */
    @NotBlank(message = "【车次编号】不能为空", groups = {AddGroup.class, EditGroup.class})
    private String trainCode;

    /**
     * 站序|第一站是0
     */
    @NotNull(message = "【站序】不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer index;

    /**
     * 站名
     */
    @NotBlank(message = "【站名】不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 站名拼音
     */
    @NotBlank(message = "【站名拼音】不能为空", groups = {AddGroup.class, EditGroup.class})
    private String namePinyin;

    /**
     * 进站时间
     */
    @NotNull(message = "【进站时间】不能为空", groups = {AddGroup.class, EditGroup.class})
    private LocalTime inTime;

    /**
     * 出站时间
     */
    @NotNull(message = "【出站时间】不能为空", groups = {AddGroup.class, EditGroup.class})
    private LocalTime outTime;

    /**
     * 里程（公里）|从上一站到本站的距离
     */
    @NotNull(message = "【里程（公里）】不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal km;
}
